package com.springboot.demo.config.demo1;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

/**
 * Create By Alvin on 2018/9/6
 * 对@Configuration注解进行理解
 **/
@Configuration
//直接引入其他的bean配置 然后可以方便配置
@Import({configdemo1.class,configdemo2.class})
public class configdemo3 {
    @Bean(name = "demo3")
    public Demo3 getDemo3(User user,Student student)
    {
        Demo3 demo3=new Demo3();
        demo3.setStudent(student);
        demo3.setUser(user);
        return demo3;
    }
}
